package com.woniu.dao;

import com.woniu.dto.HotCommentsDTO;
import com.woniu.pojo.HotComments;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface HotCommentsMapper {
    int deleteByPrimaryKey(Long id);

    int insert(HotComments record);

    int insertSelective(HotComments record);

    HotComments selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(HotComments record);

    int updateByPrimaryKey(HotComments record);
@Select("select * from hot_comments c,users u where hot_id=#{hotId} and c.user_id=u.id order by c.create_time desc")
    List<HotCommentsDTO> selectHotComment(Long hotId);
@Delete("delete from hot_comments where hot_id=#{hotId}")
    void delete(Long hotId);
    @Delete("delete from hot_tags where hot_id=#{hotId}")
    void deleteTag(Long hotId);
    @Delete("delete from hotlist_detail where hot_id=#{hotId}")
    void deleteGrade(Long hotId);

}